package com.lancoo.klgcourseware.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by pengmi on 2018/11/13.
 * Description:表达式训练模型
 */

public class ExpressPracticeModel implements Parcelable {

    //训练例句清单
    private List<WordPracticeModel> OneSentenceList;


    public static final Creator<ExpressPracticeModel> CREATOR = new Creator<ExpressPracticeModel>() {
        @Override
        public ExpressPracticeModel createFromParcel(Parcel in) {
            return new ExpressPracticeModel(in);
        }

        @Override
        public ExpressPracticeModel[] newArray(int size) {
            return new ExpressPracticeModel[size];
        }
    };

    public List<WordPracticeModel> getOneSentenceList() {
        return OneSentenceList;
    }

    public void setOneSentenceList(List<WordPracticeModel> oneSentenceList) {
        OneSentenceList = oneSentenceList;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public ExpressPracticeModel() {
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeTypedList(OneSentenceList);
    }

    protected ExpressPracticeModel(Parcel in) {
        if(OneSentenceList==null){
            OneSentenceList=new ArrayList<>();
        }
        in.readTypedList(OneSentenceList,WordPracticeModel.CREATOR);
    }
}
